using System;
using Tarkin.InfrastructureLibrary.Core.Basic;
using NUnit.Framework;

namespace Tarkin.InfrastructureLibrary.Tests.Core.Basic
{
    /// <summary>
    /// EnumerationTests is the NUnit TestFixture for the Tarkin.InfrastructureLibrary.Core.Basic.Enumeration class.
    /// </summary>
    [TestFixture]
    public class EnumerationTests
    {

        [Test]
        public void TestDefaultConstructor ()
        {
            Enumeration enumeration = new Enumeration ();

            Assert.IsNotNull ( enumeration );
        }

        [Test]
        public void TestOwnedLiteralsProperty ()
        {
            Enumeration enumeration = new Enumeration ();
            EnumerationLiteral enumerationLiteral = new EnumerationLiteral ( "EnumerationLiteral name" );

            enumeration.OwnedLiterals.Add ( enumerationLiteral );

            Assert.AreEqual ( 1, enumeration.OwnedLiterals.Count );
            Assert.IsTrue ( enumeration.OwnedLiterals.Contains ( enumerationLiteral ) );
        }

    }
}
